<!DOCTYPE html>
<html>
<head>
    <title>订单查询</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <meta name="description"
          content=""/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="/Public/css.css"/>
	<style>
		.btn_search{
			background-image:radial-gradient(at center top , #3f88fd 0%, #2870f0 100%);
			color: #fff;
		    display: inline-block;
		    height: 2.5rem;
		    line-height: 2.5rem;
		    margin: 0.5rem 0.2rem;
		    text-align: center;
		    width: 8rem;
		}		
	</style>
</head>
<body id="orderAccount">
<script type="text/javascript">
    (function () {
        document.documentElement.style.fontSize = (document.body.offsetWidth/320) * 14 + 'px';
    })()
</script>
<div class="header">
    <!--<a href="javascript:;" class="logo"></a>-->
    <a href="javascript:history.back(-1);" class="backbtn_02"></a>订单查询

</div>
<div class="content2">

    <!--search-->
	<div class="searchmod">
        <input id="txtSearch" type="text" placeholder="输入订单编号或收货人手机号码" class="searchbox">
        <a id="btnSearch" href="javascript:;"></a>
    </div>
	
    <div class="orderlist query">
   	<div id="orderlist" class="orderlist" style="margin-top:0;">
   	
	</div>
    </div>
</div>


<script type="text/javascript" src="/Public/js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="/Public/js/wj.js"></script>
<script type="text/javascript" src="/Public/js/ajaxService.js"></script>
<script type="text/javascript" src="/Public/js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$('#btnSearch').bind("click", function(){
		var keyword = $('#txtSearch').val();
		var result = OrderService.SearchOrder(keyword);
		if(result.IsSuccess == 0){
			alert(result.ErrorMsg);
			return;
		}
		else{
			var lst_order_en = result.Result;
			$('#orderlist').html('');
			var html = '';
			
			if(lst_order_en.length == 0){
				html += '无符合条件的订单！';
			}
			else{
				for(var index in lst_order_en){
					var order_en = lst_order_en[index];
					html += '<dl>';
					html += '<dt>订单编号：' + order_en.order_id + '</dt>';
					html += '<dd>';
					html += '<div class="order_info">';
					html += '<p class="order_time">下单时间：<span>' + order_en.order_date + '</span></p>';
					html += '<p>订单金额：￥' + order_en.order_amount + '</p>';
					html += '</div>';
					html += '<a class="order_view" style="top:0;background-color:white;" href="/buy/queryOrderDetail?order_id=' + order_en.order_id + '"></a>';
					html += '</dd>';
					html += '</dl>';
				}
			}
			$('#orderlist').append(html);
		}
	});
});
</script>
</body>
</html>